home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3218 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Basic Question on SWITCH
  5. Date: 26 Jan 1996 23:23:46 GMT
  6. Organization: Los Alamos National Laboratory
  7. Message-ID: <TANMOY.96Jan26162346@qcd.lanl.gov>
  8. References: <4e4cu4$95f@vixen.cso.uiuc.edu> <4e8p6m$n8q@ns.RezoNet.NET>
  9.     <3108ED49.987@cmt.lpr.mail.carel.fi>
  10. NNTP-Posting-Host: qcd.lanl.gov
  11. Mime-Version: 1.0
  12. Content-Type: text
  13. In-reply-to: Ari Lukumies's message of Fri, 26 Jan 1996 17:03:37 +0200
  14.  
  15. In article <3108ED49.987@cmt.lpr.mail.carel.fi> Ari Lukumies
  16. <aril@cmt.lpr.mail.carel.fi> writes: 
  17. <snip>
  18.        if (strchr("0123456789", a))
  19.            ... /* It was a digit, do something */
  20.  
  21. A special case for digits:
  22.  
  23. if ((unsigned)(a-'0')<10)
  24.    /* It _is_ a digit, do something */
  25.  
  26. But then what is wrong with isdigit?
  27.  
  28. Cheers
  29. Tanmoy
  30. --
  31. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  32. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  33. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  34. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  35. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  36. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  37.